﻿using GalaSoft.MvvmLight.CommandWpf;
using Mimi.Models.DataModels;
using Mimi.Models.UIModels;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mimi.ViewModels
{
    public interface IOverviewViewModel
    {
        #region Fields
        #endregion

        #region Properties
        /// <summary>
        /// Remaining Total Budget
        /// </summary>
        double Balance { get; set; }

        /// <summary>
        /// Default Currency
        /// </summary>
        Currency DefaultCurrency { get; set; }

        /// <summary>
        /// Store the number that will be added in balance
        /// </summary>
        string AddedBalance { get; set; }

        /// <summary>
        /// Store income list
        /// </summary>
        List<Income> Incomes { get; set; }

        /// <summary>
        /// Income collection for binding
        /// </summary>
        ObservableCollection<UIIncome> BindingIncomes { get; set; }
        #endregion

        #region Commands
        /// <summary>
        /// Increase balance
        /// </summary>
        RelayCommand IncreaseBalanceCommand { get; }

        /// <summary>
        /// Undo command
        /// </summary>
        RelayCommand UndoCommand { get; }
        #endregion

        #region Methods
        /// <summary>
        /// Update balance
        /// </summary>
        /// <param name="expense"></param>
        void UpdateBalance(Expense expense);

        /// <summary>
        /// Re-calculate balance
        /// </summary>
        void CalculateBalance(IEnumerable<Purpose> budgetList);

        /// <summary>
        /// Init data for OverviewViewModel when starts up
        /// </summary>
        void InitOverviewData();

        /// <summary>
        /// Load income data from database
        /// </summary>
        void LoadIncomeData();
        #endregion
    }
}
